<?php

namespace App\Models;

use Illuminate\Database\Eloquent\Model;

class MedicalHpi extends Model
{
    protected $table = 'st_medical_presentillness';

    protected $fillable = [
        'record_id', 'diet', 'sport', 'sport_strength', 'sport_time','thyroid', 'adrenal_gland', 'normal', 'remark'
    ];

    protected $casts = [
        'diet'          => 'array',
        'normal'        => 'array',
        'thyroid'       => 'array',
        'adrenal_gland' => 'array',
    ];

    public function medicalRecord()
    {
        return $this->belongsTo(MedicalRecord::class, 'record_id');
    }
}
